package com.byedu.domain.course;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户与课程信息关联实体
 * Created by jason on 2017/5/21.
 */
public class UserCourseDO implements Serializable {

    /*主键*/
    private Integer id;
    /*课程编号  对应bay_course的主键*/
    private Integer courseId;
    /*用户编号 对应bay_user.id*/
    private String userId;
    /*购买时间 也就是用户支付成功的时间*/
    private String purchaseTime;
    /*订单编号  主键*/
    private String orderId;

    public UserCourseDO () {}

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPurchaseTime() {
        return purchaseTime;
    }

    public void setPurchaseTime(String purchaseTime) {
        this.purchaseTime = purchaseTime;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserCourseDO that = (UserCourseDO) o;

        if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return orderId != null ? orderId.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "UserCourseDO{" +
                ", courseId=" + courseId +
                ", userId='" + userId + '\'' +
                ", purchaseTime=" + purchaseTime +
                ", orderId='" + orderId + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
}
